
//==================================================================================================== Nuclear Explosion
GrenadeData NBase
{
	explosionTag       = grenadeExp;
	collideWithOwner   = True;
	ownerGraceMS       = 250;
	collisionRadius    = 0;
	mass               = 5.0;
	elasticity         = 0.0;

	damageClass        = 1;
	damageValue        = 3.5;
	damageType         = $NukeDamageType;

	explosionRadius    = 35;
	kickBackStrength   = 1.0;
	maxLevelFlightDist = 375;
	totalTime          = 0.1;
	liveTime           = 0.1;
	projSpecialTime    = 0.01;

	inheritedVelocityScale = 0.0;
};

GrenadeData NRing
{
	explosionTag       = LargeShockwave;
    	explosionId        = LargeShockwave;
	
	collideWithOwner   = True;
	ownerGraceMS       = 250;
	collisionRadius    = 0;
	mass               = 5.0;
	elasticity         = 0.0;

	damageClass        = 1;
	damageValue        = 2.5;
	damageType         = $NukeDamageType;

	explosionRadius    = 35;
	kickBackStrength   = 1.0;
	maxLevelFlightDist = 375;
	totalTime          = 1.1;
	liveTime           = 0.1;
	projSpecialTime    = 1.9;

	inheritedVelocityScale = 0.0;
};

MineData NRing1
{
	mass = 1.3;
	drag = 1.0;
	density = 2.0;
	elasticity = 0;
	friction = 10.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = LargeShockwave;
	explosionRadius = 0.0;
	damageValue = 0.0;
	damageType = $NukeDamageType;
	kickBackStrength = 50;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function NRing1::onAdd(%this)
{
	schedule("Mine::Detonate(" @ %this @ ");",0.2,%this);
}


GrenadeData NBlast
{
	explosionTag       = grenadeExp;
	collideWithOwner   = True;
	ownerGraceMS       = 250;
	collisionRadius    = 0;
	mass               = 5.0;
	elasticity         = 0.0;
	
	damageClass        = 1;
	damageValue        = 1.0;
	damageType         = $NukeDamageType;

	explosionRadius    = 25;
	kickBackStrength   = 1.0;
	maxLevelFlightDist = 375;
	totalTime          = 0.1;
	liveTime           = 0.1;
	projSpecialTime    = 0.01;

	inheritedVelocityScale = 0.0;
};

GrenadeData NCloud
{
	explosionTag       = mortarExp;
	collideWithOwner   = True;
	ownerGraceMS       = 250;
	collisionRadius    = 0;
	mass               = 5.0;
	elasticity         = 0.0;

	damageClass        = 1;
	damageValue        = 1.0;
	damageType         = $NukeDamageType;

	explosionRadius    = 25;
	kickBackStrength   = 1.0;
	maxLevelFlightDist = 375;
	totalTime          = 0.1;
	liveTime           = 0.1;
	projSpecialTime    = 0.01;

	inheritedVelocityScale = 0.0;
};

//================================================================================================ Suicide Pack 1 (On Kill)

MineData Suicidebomb
{
	mass = 0.3;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "magcargo";
	shadowDetailMask = 4;
	explosionId = LargeShockwave;
	explosionRadius = 100.0;
	damageValue = 4.0;
	damageType = $ShrapnelDamageType;
	kickBackStrength = 100;
	triggerRadius = 0.2;
	maxDamage = 2.0;
};

function Suicidebomb::onAdd(%this)
{        
	schedule("NuclearExplosion(" @ %this @ ");",0.5,%this);
	schedule("Mine::Detonate(" @ %this @ ");",0.5,%this);
}

//================================================================================================ Suicide Pack 2 On Deploy

MineData Suicidebomb2
{
	mass = 0.3;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	shapeFile = "magcargo";
	shadowDetailMask = 4;
	explosionId = LargeShockwave;
	explosionRadius = 100.0;
	damageValue = 4.0;
	damageType = $ShrapnelDamageType;
	kickBackStrength = 100;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function Suicidebomb2::onAdd(%this)
{
	schedule("NuclearExplosion(" @ %this @ ");",20,%this);
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",20,%this);

}

function Suicidebomb2::onCollision(%this,%obj)
{
	if(getObjectType(%obj) != "Player")
	{
		return;
	}

	if(Player::isDead(%obj))
	{
		return;
	}

    	%c = Player::getClient(%obj);


    	%playerTeam = GameBase::getTeam(%obj);
	%teleTeam = GameBase::getTeam(%this);

	
	%armor = Player::getArmor(%obj);
	if (%armor == "earmor" || %armor == "efemale")
	{
		%rnd = floor(getRandom() * 10);
		if(%rnd < 5)
		{	
		    Client::sendMessage(%c,1,"OOPS! You cut the wrong wire...");
			NuclearExplosion(%this);
//			Mine::Detonate(%this);
			return;
		}
		else
		{	
		    $Nukecount[GameBase::getTeam(%this)]++;
		    $Nukecount[GameBase::getTeam(%obj)]--;
		    TeamMessages(1,GameBase::getTeam(%this),Client::getName(Player::getClient(%obj)) @ " has disarmed and stolen #" @ $Nukecount[GameBase::getTeam(%this)] @ " of your team's " @ $Shifter::AllNukeLimit @ " nuclear devices.",GameBase::getTeam(%obj),Client::getName(Player::getClient(%obj)) @ " has increased your team's nuclear stockpile by 1.");
		    deleteObject(%this);
		    Client::sendMessage(%c,1,"You safely disarm the Suicide Det Pack.");
		    %c.score = %c.score + 20;
		    Game::refreshClientScore(%c);
		}
	}
   
}

//==================================================================================================== Napalm Frags

GrenadeData Frag
{
	//bulletShapeName    = "mortar.dts";
   	bulletShapeName    = "plasmabolt.dts";
    	explosionTag = plasmaExp;
 	collideWithOwner = True;
 	ownerGraceMS = 50;
 	collisionRadius = 10.0;
 	mass = 5.0;
 	elasticity = 0.1;
 	damageClass = 1;
 	damageValue = 0.30;
 	damageType = $PlasmaDamageType;
 	explosionRadius = 15.0;
 	kickBackStrength = 0.1;
 	maxLevelFlightDist = 75;
 	totalTime = 4.0;
 	liveTime = 4.0;
 	projSpecialTime = 4.0;
 	lightRange = 10.0;
	lightColor = { 1, 1, 0 }; 
 	inheritedVelocityScale = -1.5;
 	smokeName = "plasmatrail.dts";
 	soundId = SoundJetLight;
};
function Frag::onAdd(%this) {schedule("DeployFrags(" @ %this @ " , 7);",getRandom() + 2.0,%this); }

MineData Frag1
{
   	mass = 5.0;
   	drag = 1.9;
   	density = 2.0;
	elasticity = 0.15;
	friction = 0.5;
	className = "Handgrenade";
	description = "Bomblet";
	shapeFile = "plasmabolt";
	shadowDetailMask = 4;
	explosionId = plasmaExp;
	explosionRadius = 20.0;
	damageValue = 0.65;
	damageType = $PlasmaDamageType;
	kickBackStrength = 300;
	triggerRadius = 0.5;
	maxDamage = 1.5;	
	inheritedVelocityScale = 0.25;

};
function Frag1::onAdd(%this) { schedule("Mine::Detonate(" @ %this @ ");",getRandom() + 1.75,%this); }

MineData Frag2
{
   	mass = 5.0;
   	drag = 1.5;
   	density = 2.0;
	elasticity = 0.35;
	friction = 1.0;
	className = "Handgrenade";
	description = "Bomblet";
	shapeFile = "plasmabolt";
	shadowDetailMask = 4;
	explosionId = plasmaExp;
	explosionRadius = 20.0;
	damageValue = 0.55;
	damageType = $PlasmaDamageType;
	kickBackStrength = 300;
	triggerRadius = 0.5;
	maxDamage = 1.5;	
	inheritedVelocityScale = 0.35;

};
function Frag2::onAdd(%this) { schedule("Mine::Detonate(" @ %this @ ");",getRandom() + 1.5,%this); }

MineData Frag3
{
   	mass = 5.0;
   	drag = 1.1;
   	density = 2.0;
	elasticity = 0.25;
	friction = 1.5;
	className = "Handgrenade";
	description = "Bomblet";
	shapeFile = "plasmabolt";
	shadowDetailMask = 4;
	explosionId = plasmaExp;
	explosionRadius = 20.0;
	damageValue = 0.45;
	damageType = $PlasmaDamageType;
	kickBackStrength = 300;
	triggerRadius = 0.5;
	maxDamage = 1.5;	
	inheritedVelocityScale = 0.45;

};
function Frag3::onAdd(%this) { schedule("Mine::Detonate(" @ %this @ ");",getRandom() + 1.0,%this); }

function DeployFrags(%this, %count, %player, %dead) 
{
	if (!%player)
	{
		%client = %this.deployer;
	}
	else
	{
		%client = Player::getClient(%player);
	}
	%player = Client::getOwnedObject(%client);
	%plDead = Player::isDead(%player);
	if(%player && (!%plDead || %dead) && %client)
	{
		%pos = gamebase::getposition(%this);
		for(%i = 0; %i < %count; %i++)
		{
			%frag = "Frag" @ (floor(getRandom()*3)+1);
			%obj = newObject("","Mine", %frag);

			if(%frag != "Frag1" && %frag != "Frag2" && %frag != "Frag3")
				%frag = "Frag";

			%obj.deployer = %client;
			addToSet("MissionCleanup", %obj);

			if ((floor(getRandom()*4)+1) > 2)
			{
				if ((floor(getRandom()*4)+1) > 3)
					GameBase::throw(%obj,%client,120,false);
				else
					GameBase::throw(%obj,%client,120,true);
			}
			else
			{
				if ((floor(getRandom()*4)+1) > 3)
					GameBase::throw(%obj,%client,-80,false);
				else
					GameBase::throw(%obj,%client,-80,true);
			}
			if(!%plDead || %dead) GameBase::setPosition(%obj,%pos);
		}
	}
}

//==================================================================================================== Bomblettes

MineData Bomblet1
{
   	mass = 5.0;
   	drag = 1.0;
   	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Bomblet";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = grenadeExp;
	explosionRadius = 10.0;
	damageValue = 0.5;
	damageType = $PlasmaDamageType;
	kickBackStrength = 100;
	triggerRadius = 0.5;
	maxDamage = 1.5;
};

function Bomblet1::onAdd(%this)
{
	schedule("Mine::Detonate(" @ %this @ ");",2.0,%this);
}

MineData Bomblet2
{
   	mass = 5.0;
   	drag = 1.0;
   	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Bomblet";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = grenadeExp;
	explosionRadius = 10.0;
	damageValue = 0.5;
	damageType = $PlasmaDamageType;
	kickBackStrength = 100;
	triggerRadius = 0.5;
	maxDamage = 1.5;
};

function Bomblet2::onAdd(%this)
{
	schedule("Mine::Detonate(" @ %this @ ");",2.25,%this);
}

MineData Bomblet3
{
   	mass = 5.0;
   	drag = 1.0;
   	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Bomblet";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = grenadeExp;
	explosionRadius = 10.0;
	damageValue = 0.5;
	damageType = $PlasmaDamageType;
	kickBackStrength = 100;
	triggerRadius = 0.5;
	maxDamage = 1.5;
};

function Bomblet3::onAdd(%this)
{
	schedule("Mine::Detonate(" @ %this @ ");",2.5,%this);
}

//==================================================================================================== Bomblettes

MineData Nukelet1
{
   	mass = 5.0;
   	drag = 1.0;
   	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Nukelet";
	shapeFile = "mortar";
	shadowDetailMask = 4;
	explosionId = ShockwaveThree;
	explosionRadius = 15.0;
	damageValue = 0.5;
	damageType = $NukeDamageType;
	kickBackStrength = 10;
	triggerRadius = 0.5;
	maxDamage = 1.5;
};

function Nukelet1::onAdd(%this)
{
	schedule("Mine::Detonate(" @ %this @ ");",2.0,%this);
}

MineData Nukelet2
{
   	mass = 5.0;
   	drag = 1.0;
   	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Nukelet";
	shapeFile = "mortar";
	shadowDetailMask = 4;
	explosionId = ShockwaveThree;
	explosionRadius = 15.0;
	damageValue = 0.5;
	damageType = $NukeDamageType;
	kickBackStrength = 10;
	triggerRadius = 0.5;
	maxDamage = 1.5;
};

function Nukelet2::onAdd(%this)
{
	schedule("Mine::Detonate(" @ %this @ ");",2.25,%this);
}

MineData Nukelet3
{
   	mass = 5.0;
   	drag = 1.0;
   	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Nukelet";
	shapeFile = "mortar";
	shadowDetailMask = 4;
	explosionId = ShockwaveThree;
	explosionRadius = 15.0;
	damageValue = 0.5;
	damageType = $NukeDamageType;
	kickBackStrength = 10;
	triggerRadius = 0.5;
	maxDamage = 1.5;
};

function Nukelet3::onAdd(%this)
{
	schedule("Mine::Detonate(" @ %this @ ");",2.5,%this);
}


MineData MDMlet
{
   	mass = 5.0;
   	drag = 1.0;
   	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "MDMlet";
	shapeFile = "mortar";
	shadowDetailMask = 4;
	explosionId = ShockwaveThree;
	explosionRadius = 15.0;
	damageValue = 0.5;
	damageType = $NukeDamageType;
	kickBackStrength = 10;
	triggerRadius = 0.5;
	maxDamage = 1.5;
};

function MDMlet::onAdd(%this)
{
	schedule("Mine::Detonate(" @ %this @ ");",30.0,%this);
}

MineData Mortarbomb2
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "mortar"; //"mortarammo";
	shadowDetailMask = 4;
	explosionId = mortarExp;

	explosionRadius = 20.0;
	damageValue = 0.5; //1.32;
	damageType = $MortarDamageType;
	kickBackStrength = 250;
	triggerRadius = 1.5;
	maxDamage = 2.0;
};

function Mortarbomb2::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",3.0,%this);
}

function Mortarbomb2::onCollision(%this, %object)
{
	%type = getObjectType(%object);
	if (%type == "Player")
	{	
		%data = GameBase::getDataName(%this);
		schedule("Mine::Detonate(" @ %this @ ");",0.1,%this);
	}
}
//==================================================================================================== Mortar Frag

MineData Mortarbomb1
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "mortar";
	shadowDetailMask = 4;
	explosionId = mortarExp;

	explosionRadius = 20.0;
	damageValue = 0.5; //1.0;
	damageType = $MortarDamageType;
	kickBackStrength = 250;
	triggerRadius = 1.5;
	maxDamage = 2.0;
};

function Mortarbomb1::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",4.0,%this);
}

function Mortarbomb1::onCollision(%this, %object)
{
	%type = getObjectType(%object);
	if (%type == "Player")
	{	
		%data = GameBase::getDataName(%this);
		schedule("Mine::Detonate(" @ %this @ ");",0.1,%this);
	}
}
//==================================================================================================== Mortar Frag

MineData Mortarbomb3
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "mortar";
	shadowDetailMask = 4;
	explosionId = mortarExp;

	explosionRadius = 20.0;
	damageValue = 0.5; //1.0;
	damageType = $MortarDamageType;
	kickBackStrength = 250;
	triggerRadius = 1.5;
	maxDamage = 2.0;
};

function Mortarbomb3::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",3.0,%this);
}

function Mortarbomb3::onCollision(%this, %object)
{
	%type = getObjectType(%object);
	if (%type == "Player")
	{	
		%data = GameBase::getDataName(%this);
		schedule("Mine::Detonate(" @ %this @ ");",0.1,%this);
	}
}

//==================================================================================================== Mortar Frag

MineData Mortarbomb4
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "mortar";
	shadowDetailMask = 4;
	explosionId = mortarExp;

	explosionRadius = 30.0;
	damageValue = 1.32;
	damageType = $MortarDamageType;
	kickBackStrength = 250;
	triggerRadius = 1.5;
	maxDamage = 2.0;
};

function Mortarbomb4::onCollision(%this, %object)
{
	%type = getObjectType(%object);
	if (%type == "Player")
	{	
		%data = GameBase::getDataName(%this);
		schedule("Mine::Detonate(" @ %this @ ");",0.1,%this);
	}
}

//==================================================================================================== Firebomb Frag

MineData Concussion3
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = grenadeExp;
	explosionRadius = 25.0;
	damageValue = 0.50;
	damageType = $FlareDamageType;
	kickBackStrength = 0;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function Concussion3::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",2.0,%this);
}

function Concussion3::onDamage(%this,%type,%value,%pos,%vec,%mom,%object)
{
   if (%type == $MineDamageType)
      %value = %value * 0.25;

	%damageLevel = GameBase::getDamageLevel(%this);
	GameBase::setDamageLevel(%this,%damageLevel + %value);
}

function Concussion3::Detonate(%this)
{
	%data = GameBase::getDataName(%this);
	GameBase::setDamageLevel(%this, %data.maxDamage);
}


//==================================================================================================== Firebomb Frag

MineData Concussion4
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = grenadeExp;
	explosionRadius = 25.0;
	damageValue = 0.50;
	damageType = $FlareDamageType;
	kickBackStrength = 0;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function Concussion4::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",2.25,%this);
}

function Concussion4::onDamage(%this,%type,%value,%pos,%vec,%mom,%object)
{
   if (%type == $MineDamageType)
      %value = %value * 0.25;

	%damageLevel = GameBase::getDamageLevel(%this);
	GameBase::setDamageLevel(%this,%damageLevel + %value);
}

function Concussion4::Detonate(%this)
{
	%data = GameBase::getDataName(%this);
	GameBase::setDamageLevel(%this, %data.maxDamage);
}

//==================================================================================================== Firebomb Frag

MineData Concussion5
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = grenadeExp;
	explosionRadius = 25.0;
	damageValue = 0.50;
	damageType = $FlareDamageType;
	kickBackStrength = 0;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function Concussion5::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",2.5,%this);
}

function Concussion5::onDamage(%this,%type,%value,%pos,%vec,%mom,%object)
{
   if (%type == $MineDamageType)
      %value = %value * 0.25;

	%damageLevel = GameBase::getDamageLevel(%this);
	GameBase::setDamageLevel(%this,%damageLevel + %value);
}

function Concussion5::Detonate(%this)
{
	%data = GameBase::getDataName(%this);
	GameBase::setDamageLevel(%this, %data.maxDamage);
}

//==================================================================================================== EMP Grenade

MineData EMPgrenade2
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = LargeShockwave;
	explosionRadius = 25.0;
	damageValue = 0.4;
	damageType = $FlashDamageType;
	kickBackStrength = 50;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function EMPgrenade2::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",2.0,%this);
}

function EMPgrenade2::onDamage(%this,%type,%value,%pos,%vec,%mom,%object)
{
   if (%type == $FlashDamageType)
      %value = %value * 0.25;

	%damageLevel = GameBase::getDamageLevel(%this);
	GameBase::setDamageLevel(%this,%damageLevel + %value);
}

//==================================================================================================== EMP Grenade

MineData EMPgrenade3
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = LargeShockwave;
	explosionRadius = 25.0;
	damageValue = 0.4;
	damageType = $FlashDamageType;
	kickBackStrength = 50;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function EMPgrenade3::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",2.25,%this);
}

function EMPgrenade3::onDamage(%this,%type,%value,%pos,%vec,%mom,%object)
{
   if (%type == $FlashDamageType)
      %value = %value * 0.25;

	%damageLevel = GameBase::getDamageLevel(%this);
	GameBase::setDamageLevel(%this,%damageLevel + %value);
}

//==================================================================================================== EMP Grenade

MineData EMPgrenade1
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = LargeShockwave;
	explosionRadius = 25.0;
	damageValue = 0.4;
	damageType = $FlashDamageType;
	kickBackStrength = 50;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function EMPgrenade1::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",2.5,%this);
}

function EMPgrenade1::onDamage(%this,%type,%value,%pos,%vec,%mom,%object)
{
   if (%type == $FlashDamageType)
      %value = %value * 0.25;

	%damageLevel = GameBase::getDamageLevel(%this);
	GameBase::setDamageLevel(%this,%damageLevel + %value);
}

//==================================================================================================== ELF Frag

MineData ELFgrenade1
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = flashExpELF;
	explosionRadius = 10.0;
	damageValue = 0.75;

	damageType = $ELFDamageType;

	kickBackStrength = 0;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function ELFgrenade1::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",2.25,%this);
}

function ELFgrenade1::onDamage(%this,%type,%value,%pos,%vec,%mom,%object)
{
   if (%type == $MineDamageType)
      %value = %value * 0.25;

	%damageLevel = GameBase::getDamageLevel(%this);
	GameBase::setDamageLevel(%this,%damageLevel + %value);
}

function ELFgrenade1::Detonate(%this)
{
	%data = GameBase::getDataName(%this);
	GameBase::setDamageLevel(%this, %data.maxDamage);

}

//==================================================================================================== Poison Frag

MineData Tranqgrenade1
{
	mass = 5.0;
	drag = 1.0;
	density = 2.0;
	elasticity = 0.15;
	friction = 1.0;
	className = "Handgrenade";
	description = "Handgrenade";
	shapeFile = "grenade";
	shadowDetailMask = 4;
	explosionId = mortarExp;
	explosionRadius = 10.0;
	damageValue = 0.75;  //was .55

	damageType = $EnergyDamageType;

	kickBackStrength = 0;
	triggerRadius = 0.5;
	maxDamage = 2.0;
};

function Tranqgrenade1::onAdd(%this)
{
	%data = GameBase::getDataName(%this);
	schedule("Mine::Detonate(" @ %this @ ");",2.0,%this);
}

function Tranqgrenade1::onDamage(%this,%type,%value,%pos,%vec,%mom,%object)
{
   if (%type == $MineDamageType)
      %value = %value * 0.25;

	%damageLevel = GameBase::getDamageLevel(%this);
	GameBase::setDamageLevel(%this,%damageLevel + %value);
}

function Tranqgrenade1::Detonate(%this)
{
	%data = GameBase::getDataName(%this);
	GameBase::setDamageLevel(%this, %data.maxDamage);

}


//======================================================================== Bomb Module Shell
GrenadeData ModuleBomb
{
   bulletShapeName    = "mineammo.dts";
   explosionTag       = LargeShockWave; //ShockwaveFour;
   collideWithOwner   = true;
   ownerGraceMS       = 400;
   collisionRadius    = 1.0;
   mass               = 155.0;
   elasticity         = 0.01;

   damageClass        = 1;
   damageValue        = 2.0;
   damageType         = $MortarDamageType;

   explosionRadius    = 40.0;
   kickBackStrength   = 250.0;
   maxLevelFlightDist = 1;
   totalTime          = 30.0;
   liveTime           = 2.0;
   projSpecialTime    = 0.01;

   inheritedVelocityScale = 0;
   smokeName              = "plasmaex.dts";//"rsmoke.dts";
};

//============================= Plasma Burn effects / Jet Smoke
GrenadeData JetSmoke
{
   bulletShapeName    = "breath.dts";
   explosionTag       = smExp;
   collideWithOwner   = True;
   ownerGraceMS       = 250;
   collisionRadius    = 1.3;
   mass               = 5.0;
   elasticity         = 0.1;

   damageClass        = 1;       // 0 impact, 1, radius
   damageValue        = 0.3;
   damageType         = $NullDamageType;

   explosionRadius    = 0;
   kickBackStrength   = 0.0;
   maxLevelFlightDist = 0;
   totalTime          = 0.01;    // special meaning for grenades...
   liveTime           = 0.01;
//   projSpecialTime    = 0.01;
   projSpecialTime    = 0.5;

   inheritedVelocityScale = 0.5;
   smokeName              = "rsmoke.dts";
};

GrenadeData AnnihilationFlame
{
   bulletShapeName    = "plasmatrail.dts";
   explosionTag       = AnnihilationFlameExp;
   collideWithOwner   = True;
   ownerGraceMS       = 250;
   collisionRadius    = 0.2;
   mass               = 1.0;
   elasticity         = 0.45;

   damageClass        = 1;
   damageValue        = 0;
   damageType         = false;

   explosionRadius    = 0;
   kickBackStrength   = 0;
   maxLevelFlightDist = 0;
   totalTime          = 0.01;    // special meaning for grenades...
   liveTime           = 0.01;
   projSpecialTime    = 0.05;

   inheritedVelocityScale = 0.5;

   smokeName              = "plasmatrail.dts";
};